<div class="content-warp">
  <div class="content-header">
    <span class="content-title">小程序基本设置</span>
  </div>
  <div class="content-body">
    <nz-spin [nzSpinning]="false">
      <div class="inner-content">
        <form nz-form [formGroup]="validateForm"  (ngSubmit)="_submitForm()">

          <div nz-row>
            <div nz-form-item nz-col [nzSm]="12">
              <div nz-form-label nz-col [nzSm]="8" [nzXs]="24">App ID：</div>
              <div nz-form-control nz-col [nzSm]="14" [nzXs]="24">
                {{AppID}}
              </div>
            </div>

            <div nz-form-item nz-col [nzSm]="12">
              <div nz-form-label nz-col [nzSm]="8" [nzXs]="24">小程序名称：</div>
              <div nz-form-control nz-col [nzSm]="14" [nzXs]="24">
                {{appletName}}
              </div>
            </div>
          </div>

          <div nz-row>
            <div nz-form-item nz-col [nzSm]="12">
              <div nz-form-label nz-col [nzSm]="8" [nzXs]="24">支付商户号：</div>
              <div nz-form-control nz-col [nzSm]="14" [nzXs]="24">
                <nz-input [nzSize]="'large'" formControlName="mch_id" style="width: 100%"></nz-input>
              </div>
            </div>

            <div nz-form-item nz-col [nzSm]="12">
              <div nz-form-label nz-col [nzSm]="8" [nzXs]="24">支付Key：</div>
              <div nz-form-control nz-col [nzSm]="14" [nzXs]="24">
                <nz-input [nzSize]="'large'" formControlName="pay_key" style="width: 100%"></nz-input>
              </div>
            </div>
          </div>

          <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSm]="4" [nzXs]="24">证书：</div>
            <div nz-form-control nz-col [nzSm]="19" [nzXs]="24">
              <nz-input [nzSize]="'large'" nzType="textarea" [nzRows]="'6'" formControlName="apiclient_cert" style="width: 100%"></nz-input>
            </div>
          </div>

          <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSm]="4" [nzXs]="24">证书密钥：</div>
            <div nz-form-control nz-col [nzSm]="19" [nzXs]="24">
              <nz-input [nzSize]="'large'" nzType="textarea" [nzRows]="'6'" formControlName="apiclient_key" style="width: 100%"></nz-input>
            </div>
          </div>

          <div nz-form-item nz-row style="margin-bottom:8px;">
            <div nz-form-control nz-col [nzSpan]="14" [nzOffset]="12">
              <button nz-button [nzSize]="'large'" [nzType]="'primary'">保存</button>
            </div>
          </div>
        </form>
      </div>
    </nz-spin>
  </div>
</div>


<nz-modal [nzVisible]="isVisible" [nzTitle]="'提示'" [nzContent]="modalContent1" (nzOnCancel)="isVisible = false" (nzOnOk)="bindPaySubmit()">
  <ng-template #modalContent1>
    你确定要修改小程序基本设置吗？修改后无法撤回，请自行做好备份。
  </ng-template>
</nz-modal>


<nz-modal [nzVisible]="isVisible2" [nzTitle]="'提示'" [nzContent]="modalContent"  [nzFooter]="modalFooter" [nzClosable]="false">
  <ng-template #modalContent>
    小程序权限不满足，请重新授权
  </ng-template>
  <ng-template #modalFooter>
    <button nz-button [nzType]="'primary'" [nzSize]="'large'" routerLink="/member/applet-setting/authorization">
      <span>确 定</span>
    </button>
  </ng-template>
</nz-modal>
